Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check first versionIRI then versionInfo in ontology.get_version() #301

Merged
merged 9 commits into from
Dec 7, 2021

Conversation

francescalb
Copy link
Collaborator

@francescalb francescalb commented Nov 24, 2021

Description:

Improve on get_version in ontology so that also versionInfo is checked for.

See discussion on #299

Also changed so that rdflib can guess format in ontoversion.

Ontoversion only checks for version from versionIRI as this should be the case for a correctly defined ontology.

Type of change:

  • Bug fix.
  • New feature.
  • Documentation update.

Checklist:

This checklist can be used as a help for the reviewer.

  • Is the code easy to read and understand?
  • Are comments for humans to read, not computers to disregard?
  • Does a new feature has an accompanying new test (in the CI or unit testing schemes)?
  • Has the documentation been updated as necessary?
  • Does this close the issue?
  • Is the change limited to the issue?
  • Are errors handled for all outcomes?
  • Does the new feature provide new restrictions on dependencies, and if so is this documented?

Comments:

tools/ontoversion Outdated Show resolved Hide resolved
@francescalb francescalb linked an issue Nov 25, 2021 that may be closed by this pull request
@francescalb
Copy link
Collaborator Author

@jesper-friis
Can you please look at the ontology.get_version() now and see if you think this is the way to go forward?
I am now giving precedence to versionInfo, but this should be discussed.

the tools/ontoversion is not implemented correctly yet as I want us to decide if this is the right approach first.

ontopy/ontology.py Outdated Show resolved Hide resolved
@francescalb francescalb changed the title Removed duplicate infer_version from ontoversion. Check first versionIRI then versionInfo in ontology.get_version() Dec 6, 2021
@francescalb francescalb marked this pull request as ready for review December 6, 2021 07:42
Copy link
Collaborator

@jesper-friis jesper-friis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks very good.

My only question is whether we should encourage setting versionInfo to just be the version number without the prepended "v".

@francescalb
Copy link
Collaborator Author

Looks very good.

My only question is whether we should encourage setting versionInfo to just be the version number without the prepended "v".

Sure, it did it to keep track of versionIRI vs versionInfo, but it should be removed now.

@francescalb francescalb merged commit 63ead2e into master Dec 7, 2021
@francescalb francescalb deleted the flb/close-299-check_version branch December 7, 2021 06:40
@francescalb francescalb restored the flb/close-299-check_version branch December 7, 2021 06:41
@CasperWA CasperWA deleted the flb/close-299-check_version branch March 2, 2022 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check out how to get version of ontology
2 participants